<% content_for :title do %>Edit an existing user<% end %><h1>Editing User</h1>

<% if @user.errors.any? %>
	<div id="error_explanation">
		<h2><%= pluralize(@user.errors.count, "error") %> prohibited this user from being updated:</h2>

		<ul>
		<% @user.errors.full_messages.each do |msg| %>
			<li><%= msg %></li>
		<% end %>
		</ul>
	</div>
<% end %>

<form action="<%=user_path(@user)%>" method="post">
	<input name="authenticity_token" value="<%= form_authenticity_token %>" type="hidden">
	<input name="_method" value="put" type="hidden" />
	<input type="text" name="user[first_name]" value="<%=@user.first_name%>" />
	<input type="text" name="user[last_name]" value="<%=@user.last_name%>" />
	<input type="text" name="user[email_address]" value="<%=@user.email_address%>" />
	<input type="password" name="user[password]" Placeholder="Password"/>
	<input type="password" name="user[password_confirmation]" Placeholder="Confirm Password"/>
	<input type="submit" value="Save Changes" />
</form>

<%= link_to 'Show', @user %> |
<%= link_to 'Back', users_path %>